import 'package:flutter/material.dart';

class Empty extends StatefulWidget {
  const Empty({Key? key}) : super(key: key);

  @override
  State<Empty> createState() => _EmptyState();
}

class _EmptyState extends State<Empty> {
  @override
  Widget build(BuildContext context) {
    return SizedBox(
      height: 500,
      child: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            Image.asset(
              'images/ic_empty.png',
              width: 175,
              height: 122,
            ),
            const SizedBox(height: 20,),
            ElevatedButton(
              onPressed: (){
                Navigator.pop(context, 0);
              },
              child: Container(
                height: 38,
                width: 104,
                child: const Text('返回'),
                alignment: Alignment.center,
              ),
              style: ButtonStyle(
                backgroundColor: MaterialStateProperty.all(Colors.white),
                foregroundColor: MaterialStateProperty.all(Color(0xFF7F69D9)),
                elevation: MaterialStateProperty.all(0),
                side: MaterialStateProperty.all(const BorderSide(width: 1,color: Color(0xFF7F69D9))),//边框
                shape: MaterialStateProperty.all(
                    const StadiumBorder(
                        side: BorderSide(
                          //设置 界面效果
                          style: BorderStyle.solid,
                          color: Color(0xFF7F69D9),
                        )
                    )
                ),//圆
              ),
            ),
          ],
        ),
      ),
    );
    // return ListView.builder(
    //   itemCount: 1,
    //   itemBuilder: (ctx, index) => Container(
    //     margin: const EdgeInsets.only(top: 120),
    //     alignment: Alignment.center,
    //     child: Image.asset("images/ic_empty.png", width: 250, height: 368 * 250 / 357,),
    //   ),
    // );
  }
}
